-- Intersperse a list of lists.

-- Exercise 7.
intersperse :: a -> [[a]] -> [a]
intersperse separator (x:xs)
    | null xs = x
    | otherwise = x ++ (separator : (intersperse separator xs))
intersperse separator _ = []
